package com.lzy.service.impl;

import com.lzy.mapper.customerMapper;
import com.lzy.pojo.customer;
import com.lzy.service.customerService;
import com.lzy.util.SqlSessionFactoryUtils;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

public class customerServiceImpl implements customerService {
    SqlSessionFactory factory = SqlSessionFactoryUtils.getSqlSessionFactory();
    @Override
    public customer select(String cus_num) {
        SqlSession sqlSession = factory.openSession();
        customerMapper mapper = sqlSession.getMapper(customerMapper.class);
        customer customer = mapper.select(cus_num);
        sqlSession.close();
        return customer;
    }
}
